//
//  ChannelPostHotposts.m
//  __PRODUCTNAME__
//
//  Created by Hanlingyu on 16/09/12
//  Copyright (c) apple. All rights reserved.
//

#import "ChannelPostHotposts.h"
#import "ChannelPosts.h"

@implementation ChannelPostHotposts

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"posts"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ChannelPosts *post = [ChannelPosts modelWithDic:dic];
            [array addObject:post];
        }
        _posts = array;
    }
}

+ (NSDictionary *)objectClassInArray{
    return @{@"posts" : [ChannelPosts class]};
}

@end
